<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@taglib uri="/struts-tags"  prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><s:text name="OpenNice_Header"/></title>
<link href="css/home.css" type="text/css" rel="stylesheet" />
<link href="css/OpenNiceTable.css" type="text/css" rel="stylesheet" />
<link href="css/base.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" language="javascript">
           function onResultsRowClick(target){
              document.location = target;
            } 
</script>
</head>
<body>
  <div id="body">
    
	 
	  <jsp:include page="second.jsp" flush="false" ></jsp:include>	 
	 
	 
	 <div id="main">
	 <div class="grid">
	  <div class="content">
	  
	  <div class="txt-20-blu">
	  <s:if test="totalPage">
	    Browse Projects
	  </s:if>
	  <s:else>
	    A Category Projects
	  </s:else>
	  </div>
      <div id="resultsTable">
        <div id="resultsHeader">
          <div class="viewCount">&nbsp;</div>
       </div>
   <div id="resultsTable">
     <img width="901" height="7" alt="" src="img/new_table_top.gif"/>
          <table width="901" cellspacing="0" cellpadding="0" style="table-layout:fixed; word-wrap:break-word;">
            <tbody>
            
<tr class="headerRow">
<th width="128" align="left">Project Name</th>
<th width="155" align="left" style="text-align: left;"><a href="#" rel="nofollow">Publisher</a></th>
<th width="80" align="left" style="text-align: left;">Avg (USD)</th>
<th width="205">Job Type</th>
<th width="190"><a href="#" rel="nofollow" style="vertical-align:top">
<img border="0" src="img/arr_desc.png"/>
&nbsp;Started
</a>
</th>
</tr>
            
          <s:if test="listSonnies">
										  <s:iterator value="listSonnies" id="sonny" status="st">
										     <s:if test="#st.odd">
										     <tr class="oddRow" onmouseover="this.className='rollOverRow';"	onmouseout="this.className='oddRow';" title="Matlab Coding"
										      onclick=onResultsRowClick('<%=basePath%>web/showSonny?sonnyId=${sonny.JId }');
										     >
										      <td>${sonny. JName}</td>
										      <td>${sonny. user.UName}</td>
										      <td>${sonny. JPrice}</td>
										      <td><a href="<%=basePath%>web/showSonnyList?categoryId=${sonny.category.CId}">${sonny.category.CName}</a></td>
										      <td>${sonny. JUpdateTime}</td>
										    </tr>
										     </s:if>
										     <s:else>
										     <tr class="evenRow" onmouseover="this.className='rollOverRow';" onmouseout="this.className='evenRow';" title="Matlab Coding" 
										     onclick=onResultsRowClick('<%=basePath%>web/showSonny?sonnyId=${sonny.JId }');
										     >
										      <td>${sonny. JName}</td>
										      <td>${sonny. user.UName}</td>
										      <td>${sonny. JPrice}</td>
										      <td><a href="<%=basePath%>web/showSonnyList?categoryId=${sonny.category.CId}">${sonny.category.CName}</a></td>
										      <td>${sonny. JUpdateTime}</td>
										     </tr>
										     </s:else>
										  </s:iterator>
										</s:if> 
            </tbody>
          </table>
          <img width="901" height="11" alt="" src="img/new_table_bottom.gif"/>
     </div>
 <div class="nav-btns-wrap" align="center">
   <div class="nav-btns">
     <a href="<%=basePath %>/web/create.jsp"><span class="nav-a btn_sbmt">POST A PROJECT NOW</span></a>
     <a href="<%=basePath %>/web/register.jsp"><span class="nav-b btn_sbmt ml20">SIGN UP NOW FOR FREE</span></a>
   </div>
</div>
	  </div>
	 </div>
	 </div>
	 <div id="foot">
	  <div class="grid"> 
	   <div class="howitworks-wrap">
         <span class="txt-20-blu nlp">How it Works</span>
          <div class="howitworks"></div>
        </div>
		 </div>
	 </div>  
  </div>
</body>
</html>
